#include "common.utils.hpp"


void test_mixer() {
    INIT_ALL_FUNC;
    Mix_Init(MIX_INIT_MP3);
    // 分音乐和音效

    MOSTCOMMWINDOWANDRENDERER
    Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS,2048);

    SDL_SetRenderDrawColor(renderer, COLORSET(60,c0,11,22));
    SDL_RenderClear(renderer);
    Present(renderer);

//    Mix_Chunk * waves = Mix_LoadWAV("Resources/Audio/test.wav");
    MAKEWAVES("Resources/Audio/test.wav");
    Mix_PlayChannel(-1, waves,10);
    DELAY(9000);
    Mix_FreeChunk(waves);

    MOSTCOMMWINDOWANDRENDER_FREE
    Mix_CloseAudio();

    Mix_Quit();
    SDL_Quit();
}